home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Devpac 2.12 disk 2.adf / include.cbm / libraries / filehandler.i < prev    next >
Text File  |  1987-03-31  |  4KB  |  94 lines

  1.  
  2. **** libraries/filehandler.i **********************************************
  3. *
  4. *  device and file handler specific code for AmigaDOS
  5. *
  6. * Copyright (C) 1986,  Commodore-Amiga, Inc., All rights reserved.
  7. *
  8. * $Header: filehandler.i,v 33.4 86/05/21 19:14:20 neil Exp $
  9. *
  10. * $Locker:  $
  11. *
  12. ****************************************************************************/
  13.  
  14.         IFND    LIBRARIES_FILEHANDLER_I
  15. LIBRARIES_FILEHANDLER_I SET     1
  16.  
  17.         IFND      EXEC_TYPES_I
  18.         INCLUDE "exec/types.i"
  19.         ENDC     !EXEC_TYPES_I
  20.  
  21.         IFND      EXEC_PORTS_I
  22.         INCLUDE "exec/ports.i"
  23.         ENDC     !EXEC_PORTS_I
  24.  
  25.         IFND      LIBRARIES_DOS_I
  26.         INCLUDE "libraries/dos.i"
  27.         ENDC     !LIBRARIES_DOS_I
  28.  
  29.  
  30. ** The disk "environment" is a longword array that describes the
  31. ** disk geometry.  It is variable sized, with the length at the beginning.
  32. ** Here are the constants for a standard geometry.
  33.  
  34. ** these are the offsets into the array
  35. DE_TABLESIZE    EQU     0       ; standard value is 11
  36. DE_SIZEBLOCK    EQU     1       ; in longwords: standard value is 128
  37. DE_SECORG       EQU     2       ; not used; must be 0
  38. DE_NUMHEADS     EQU     3       ; # of heads (surfaces). drive specific
  39. DE_SECSPERBLK   EQU     4       ; not used; must be 1
  40. DE_BLKSPERTRACK EQU     5       ; blocks per track. drive specific
  41. DE_RESERVEDBLKS EQU     6       ; unavailable blocks at start.  usually 2
  42. DE_PREFAC       EQU     7       ; not used; must be 0
  43. DE_INTERLEAVE   EQU     8       ; usually 0
  44. DE_LOWCYL       EQU     9       ; starting cylinder. typically 0
  45. DE_UPPERCYL     EQU     10      ; max cylinder.  drive specific
  46. DE_NUMBUFFERS   EQU     11      ; starting # of buffers.  typically 5
  47. DE_MEMBUFTYPE   EQU     12      ; type of mem to allocate for buffers.
  48.                                 ;     default is 3, hard disks want 0
  49.  
  50.  
  51. ** The file system startup message is linked into a device node's startup
  52. ** field.  It contains a pointer to the above environment, plus the
  53. ** information needed to do an exec OpenDevice().
  54.  
  55.  STRUCTURE FileSysStartupMsg,0
  56.     ULONG       fssm_Unit       ; exec unit number for this device
  57.     BSTR        fssm_Device     ; null terminated bstring to the device name
  58.     BPTR        fssm_Environ    ; ptr to environment table (see above)
  59.     ULONG       fssm_Flags      ; flags for OpenDevice()
  60.     LABEL       FileSysStartupMsg_SIZEOF
  61.  
  62.  
  63. ** The include file "libraries/dosextens.h" has a DeviceList structure.
  64. ** The "device list" can have one of three different things linked onto
  65. ** it.  Dosextens defines the structure for a volume.  DLT_DIRECTORY
  66. ** is for an assigned directory.  The following structure is for
  67. ** a dos "device" (DLT_DEVICE).
  68.  
  69.  STRUCTURE DeviceNode,0
  70.     BPTR        dn_Next         ; singly linked list
  71.     ULONG       dn_Type         ; always 0 for dos "devices"
  72.     CPTR        dn_Task         ; standard dos "task" field.  If this is
  73.                                 ;     null when the node is accesses, a task
  74.                                 ;     will be started up
  75.     BPTR        dn_Lock         ; not used for devices -- leave null
  76.     BSTR        dn_Handler      ; filename to loadseg (if seglist is null)
  77.     ULONG       dn_StackSize    ; stacksize to use when starting task
  78.     LONG        dn_Priority     ; task priority when starting task
  79.     BPTR        dn_Startup      ; startup msg: FileSysStartupMsg for disks
  80.     BPTR        dn_SegList      ; code to run to start new task (if necessary).
  81.                                 ;     if null then dn_Handler will be loaded.
  82.     BPTR        dn_GlobalVec    ; BCPL global vector to use when starting
  83.                                 ;     a task.  -1 means that dn_SegList is not
  84.                                 ;     for a bcpl program, so the dos won't
  85.                                 ;     try and construct one.  0 tell the
  86.                                 ;     dos that you obey BCPL linkage rules,
  87.                                 ;     and that it should construct a global
  88.                                 ;     vector for you.
  89.     BSTR        dn_Name         ; the node name, e.g. '\3','D','F','3'
  90.     LABEL       DeviceNode_SIZEOF
  91.  
  92.  
  93.         ENDC    !LIBRARIES_FILEHANDLER_I
  94.